package com.project.lx.gettxtfilename.RecycleView;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.View;

import com.project.lx.baseproject.base.BaseActivity;
import com.project.lx.gettxtfilename.R;
import com.project.lx.gettxtfilename.RecycleView.adapter.HomeAdapter;
import com.project.lx.gettxtfilename.RecycleView.adapter.TestAdapter;
import com.project.lx.gettxtfilename.RecycleView.divider.TestDicider;
import com.project.lx.gettxtfilename.RecycleView.divider.TimelienItemDecoration;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

public class RecycleView2Activity extends BaseActivity implements TestAdapter.OnItemClickLitener{

    List mList;
    TestAdapter testAdapter;

    @BindView(R.id.rec_view2)
    RecyclerView recView2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public void initRootView() {
        setContentView(R.layout.activity_recycle_view2);
    }

    @Override
    public void initView() {

    }

    @Override
    public void initData() {
        mList = new ArrayList();
        for (int i = 'A'; i < 'z'; i++) {
            mList.add("" + (char) i);
        }

        testAdapter = new TestAdapter(this, mList);
        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
        layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
        recView2.setLayoutManager(layoutManager);
        recView2.addItemDecoration(new TimelienItemDecoration(this));
        recView2.setAdapter(testAdapter);
    }

    @Override
    public void initListener() {

    }

    @Override
    public void onItemClick(View view, int position) {

    }

    @Override
    public void onItemLongClick(View view, int position) {

    }
}
